package com.meepo.basic.components.view

import android.os.Bundle
import com.meepo.basic.components.eventbus.EventBusManager
import com.meepo.sdk.component.view.fragment.LoadOnceOnVisibleFragment

abstract class MeepoFragment : com.meepo.sdk.component.view.fragment.LoadOnceOnVisibleFragment() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        if (enableEventBus()) EventBusManager.register(this)
    }

    override fun onDestroy() {
        super.onDestroy()
        if (enableEventBus()) EventBusManager.unregister(this)
    }

//    override fun onStop() {
//        super.onStop()
//
//    }

    open fun enableEventBus(): Boolean = false

}